From 7b8a76ee7880b715d20befa89c7e316a32398ff6 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 22 Dec 2004 15:09:16 +0000 Subject: [PATCH] bitkeeper revision 1.1159.187.75 (41c98e1cJF7FTRAcKrESOThaChSpOQ) Check for a recent GCC version before building Xen. --- xen/arch/x86/Rules.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index bceb1982f4..d569a435c5 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -32,3 +32,20 @@ CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks CFLAGS += -fno-asynchronous-unwind-tables LDFLAGS := --oformat elf64-x86-64 endif + +# Test for at least GCC v3.2.x. +gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/') +ifeq ($(call gcc-ver,1),1) +$(error gcc-1.x.x unsupported - upgrade to at least gcc-3.2.x) +endif +ifeq ($(call gcc-ver,1),2) +$(error gcc-2.x.x unsupported - upgrade to at least gcc-3.2.x) +endif +ifeq ($(call gcc-ver,1),3) +ifeq ($(call gcc-ver,2),0) +$(error gcc-3.0.x unsupported - upgrade to at least gcc-3.2.x) +endif +ifeq ($(call gcc-ver,2),1) +$(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x) +endif +endif -- 2.30.2